package com.etoak;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

@SpringBootApplication
@RestController
public class RedisAppliction {

    public static void main(String[] args) {
        SpringApplication.run(RedisAppliction.class,args);
    }

    @Autowired
    StringRedisTemplate stringRedisTemplate;

    @RequestMapping("/test")
    public Object test() {
        return stringRedisTemplate.opsForValue().multiGet(Arrays.asList("name","id","email"));
    }
}
